PAGE 1

Heat Equation

A horizontal cylinder representing a rod with boundaries x=0 and x=L.

conducting rod length L

heat can flow along the rod (–x direction)

but not laterally (not ‘up’ or ‘down’)

temperature: \( u(x, t) \)

x: position

t: time

the governing equation is the 1-D Heat Equation

\[ \frac{\partial u}{\partial t} = k \frac{\partial^2 u}{\partial x^2} \]

\( k > 0 \)

diffusivity constant

or \( u_t = k u_{xx} \)

this is a partial diff. eq. (PDE)

the heat eq. comes from conservation of energy and Fourier's law

PAGE 2

what does \( u_t = k u_{xx} \) say?

\( u_{xx} \) : concavity of \( u \) with respect to \( x \)

  • if \( u_{xx} > 0 \) (concave up) then \( u_t > 0 \) temp. increases
  • if \( u_{xx} < 0 \) (concave down) then \( u_t < 0 \) temp. decreases
Coordinate graph of u vs x showing a curve with a peak (concave down) and a valley (concave up).

Hotter than surrounding

heat wants to move away

\( u_t < 0 \) (temp. fall)

Colder than surrounding

heat wants to move in

\( u_t > 0 \) (temp. rise)

PAGE 3

Solving the Heat Equation

\[ u_t = k u_{xx} \quad 0 < x < L, \quad t > 0 \]

Problem Setup

  • \( u(0, t) = T_1 \) (left end temp.)
  • \( u(L, t) = T_2 \) (right end temp.)
  • \( u(x, 0) = f(x) \) (initial temp. profile)
Diagram of a horizontal rod with endpoints at x=0 and x=L.

The first two are boundary conditions (BC).

The last one is an initial condition (IC).

Homogeneous Case

We will solve the case where \( T_1 = T_2 = 0 \) (homogeneous BC's).

We will use the method of separation of variables.

Separation of Variables

Assume \( u(x, t) = X(x)T(t) \) (product of two functions):

  • \( X \): only of \( x \)
  • \( T \): only of \( t \)
\[ u_t = \frac{\partial}{\partial t} (X(x)T(t)) = X T' \]
Note:
\( X(x) \) is treated as a "constant" with respect to \( t \).

Likewise, \( u_{xx} = X'' T \)

PAGE 4

Substituting into the Heat Equation

Back to \( u_t = k u_{xx} \):

\[ X T' = k X'' T \]

Separate them:

\[ \frac{X''}{X} = \frac{T'}{kT} = \text{constant} = -\lambda \quad (\lambda > 0) \]
Where:
\( \frac{X''}{X} \) only depends on \( x \)
\( \frac{T'}{kT} \) only depends on \( t \)
\( -\lambda \) is the separation constant

Resulting Ordinary Differential Equations (ODEs)

\[ \frac{X''}{X} = -\lambda \rightarrow \]
\[ X'' + \lambda X = 0 \]
\[ \frac{T'}{kT} = -\lambda \rightarrow \]
\[ T' + k\lambda T = 0 \]

These are two ODEs.

Boundary Conditions for \( X(x) \)

\( u(0, t) = 0 \rightarrow X(0)T(t) = 0 \rightarrow \)
\( X(0) = 0 \)
\( u(L, t) = 0 \rightarrow X(L)T(t) = 0 \rightarrow \)
\( X(L) = 0 \)
PAGE 5

Solving the Spatial Differential Equation

solve

\[ X'' + \lambda X = 0, \quad X(0) = X(L) = 0 \]
\[ X(x) = A \cos(\sqrt{\lambda}x) + B \sin(\sqrt{\lambda}x) \]

\[ X(0) = 0 = A \]

\[ X(L) = 0 = B \sin(\sqrt{\lambda}L) \]

require \( B \neq 0 \)

\[ \sin(\sqrt{\lambda}L) = 0 \]

\[ \sqrt{\lambda}L = n\pi \]

\[ n = 1, 2, 3, \dots \]

\[ \lambda_n = \frac{n^2\pi^2}{L^2} \]

eigenvalues

for each \( n \), there is one \( X \) solution

\[ X_n(x) = \sin\left(\frac{n\pi}{L}x\right) \]

eigenfunctions

(drop the scaling constant B)

PAGE 6

Solving the Temporal Differential Equation and General Solution

now \( T' + k\lambda T = 0 \)

use \( \lambda = \frac{n^2\pi^2}{L^2} \)

\[ T' + \frac{kn^2\pi^2}{L^2} T = 0 \]
\[ T(t) = C e^{(-kn^2\pi^2/L^2)t} \]

\[ T_n(t) = e^{-kn^2\pi^2/L^2 t} \]

for each \( n = 1, 2, 3, \dots \) there is one solution

drop the scaling constant \( C \)

\[ u(x,t) = X(x)T(t) \]

\[ \text{for each } n, \quad u_n = X_n T_n \]

the general solution is linear combo of all

\[ u(x,t) = \sum_{n=1}^{\infty} C_n e^{-kn^2\pi^2/L^2 t} \sin\left(\frac{n\pi x}{L}\right) \]

\[ C_n = ? \]

PAGE 7

One unused condition: u(x, 0) = f(x) (initial condition)

\[ f(x) = \sum_{n=1}^{\infty} C_n \sin\left(\frac{n\pi x}{L}\right) \]

sine series w/ half-period L

\[ C_n = \frac{2}{L} \int_{0}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) dx \]